package cn.labbook.bluetooth.pojo.dto;

import lombok.Data;

/**
 * @Author: zhangyang
 * @Date: 2019/12/18 11:14
 * @Desc: 文件上传dto
 */
@Data
public class UploadDTO {

    /**
     * 上传文件名称
     */
    private String oldName;
    /**
     * 上传文件半路径
     */
    private String halfPath;
    /**
     * 上传文件全路径
     */
    private String fullPath;
    /**
     * 上传文件类型
     */
    private Integer type;


    public UploadDTO() {
    }

    public UploadDTO(String fullPath) {
        this.fullPath = fullPath;
    }

    public UploadDTO(String fullPath, String oldName) {
        this.fullPath = fullPath;
        this.oldName = oldName;
    }

    public UploadDTO(String fullPath, Integer type) {
        this.fullPath = fullPath;
        this.type = type;
    }

    public enum Type {

        IMAGE(1, "图片"),
        PDF(2, "pdf")

        ;
        private int key;
        private String value;

        public int getKey() {
            return key;
        }

        public String getValue() {
            return value;
        }

        Type(int key, String value) {
            this.key = key;
            this.value = value;
        }
    }

}
